package rayTracer;

public interface ApplicationInterface {
	//For our command parser
	public static final String[] validSwitches = {"i","o", "time", "progress", "show" }; 
	public enum SWITCHES{INPUT, OUTPUT, TIME, PROGRESS, SHOW};
	
	//Default scene to work with
	public static final String DEFAULT_SCENE = "scene1.sc";
	
	//Default output filename
	public static final String OUT_FILE = "scene1";	
	
	//Default output file format
	public static final String DEFAULT_EXTENSION = "png";
	
	//Definition for the RGB components to build images
	public enum RGB_POS{ALPHA, RED, GREEN, BLUE };
	
	//Ray tracer constants
	//public static final int RAY_TRACER_DIFF = 1; 
	//public static final int RAY_TRACER_REFL = 4; 
	//public static final int RAY_TRACER_REFR = 4;
	public static final int MAX_RAY_TRACER_DEPTH = 2;
	
	// Caracteristicas de las luces	
	public static final float LIGHT_D = 1;
	public static final float LIGHT_S = 1;
	public static final float LIGHT_A = 1;
	public static final float DISTANCE_FALLOFF_START = 1;
	public static final float DISTANCE_FALLOFF_END = 100;

	// Coeficientes de reflexion: Difusa, Especular, Ambiente
	public static final float DIFFUSE_K = 1;
	public static final float SPECULAR_K = 10;
	public static final float AMBIENT_K = 0.0f;
	// Potencia de la luz especular
	public static final float SPECULAR_POWER = 50;
	
	// Algunos indices de refraccion
	public static final float AGUA = 1.33f;
	public static final float ALCOHOL= 1.36f;
	public static final float VIDRIO = 1.52f;
	public static final float VIDRIO_DENSO = 1.66f;

	// Coeficientes de reflexion y refraccion
	public static final float REFLECT_K = 0.2f;
	public static final float REFRACT_K = 1f;
	public static final float REFRACT_INDEX = VIDRIO;
		
	//Default size for the imagePlate, also called canvas
	public static final int WIDTH = 600;
	public static final int HEIGHT = 600;

	//Default canvas position	
	public static final double[] CANVAS_POSITION = {0, 0, 5};
	
	//Default camera position, eye position
	public static final double[] CAMERA_POSITION = {0, 0, 10};	
	//Default vertical reference for the camera	
	public static final double[] VERT_REFERENCE = {0, 1, 10};	
	//Default Visual Angle for the camera 
	public static final double  VISUAL_ANGLE = 60;
	 
	//Default values for a Cube
	public static final double CUBE_SIDE_LEN = 1;
	public static final double[] CUBE_POSITION = {0, 0, 0.5};	
	
	//Default values for the Sphere
	public static final double SPHERE_RADIUS = 1;
	public static final double[] SPHERE_POSITION = {0, 0, 0};
	
	//Default values for the Piramid
	public static final double PYRAMID_SIDE = 1;
	public static final double PYRAMID_HEIGHT = 1;
	public static final double[] PYRAMID_APEX = {0, 0, 1};
	//Barycentric point or centroid of a pyramid is located on the line segment
	//that connects the apex to the centroid of the base, and divides that 
	//segment in the ratio 3:1. For the default case, it is easy
	public static final double[] PYRAMID_POSITION = {0, 0, 1.0/3.0};	
	
	//For overlapping
	public enum STATES{ IN , EDGE, OUT};
	//For octree initialization
	public static final double[] OCTREE_POSITION = {0, 0, 0};
	//public static final double OCTREE_HALFWIDTH = 40;
	public static final int OCTREE_MAX_PRIMITIVES_PER_NODE = 10;
	public static final int OCTREE_MAX_DEPTH = 10;
	
	//Sun FLow Parser
	public enum CODE_BLOCK{UNKNOWN,INCLUDE, IMAGE, LIGHT, SHADER, CAMERA, OBJECT};
	public String[] codeBlockStrings={"include", "image", "light", 
										"shader", "camera", "object"};
	
	public String espacios = "\\s+";
	public String comillas = "\"";
		
	//Shader Config
	public enum SHADER_TYPE{CONSTANT, PHONG, MIRROR, GLASS};
	public String[] shaderTypeStrings = {"constant", "phong", "mirror", "glass"};
	public SHADER_TYPE[] shaderTypeCodes = {SHADER_TYPE.CONSTANT, SHADER_TYPE.PHONG,
												SHADER_TYPE.MIRROR, SHADER_TYPE.GLASS};
	
	//Light Config
	public enum LIGHT_TYPE{POINT, DIRECTIONAL};
	public String[] lightTypeStrings = {"point", "directional"};
	public LIGHT_TYPE[] lightTypeCodes = {LIGHT_TYPE.POINT, LIGHT_TYPE.DIRECTIONAL};	
	
	public enum LIGHT_MODEL{sRGB_LINEAR, sRGB_NON_LINEAR};
	
	//Camera Config
	public enum CAMERA_TYPE{PINHOLE, THINLENS};
	public String[] cameraTypeStrings = {"pinhole", "thinlens"};
	public CAMERA_TYPE[] cameraTypeCodes = {CAMERA_TYPE.PINHOLE, CAMERA_TYPE.THINLENS};
	
	//Object Config
	public enum OBJECT_TYPE{SPHERE, BOX, PLANE, GENERIC_MESH};
	public String[] objectTypeStrings = {"sphere", "box", "plane", "generic-mesh"};
	public OBJECT_TYPE[] objectTypeCodes = {OBJECT_TYPE.SPHERE, OBJECT_TYPE.BOX,
									OBJECT_TYPE.PLANE, OBJECT_TYPE.GENERIC_MESH};
}
